import Map from "@arcgis/core/Map"
import MapView from "@arcgis/core/views/MapView"
import BaseMap from "@arcgis/core/BaseMap"
import Graphic from "@arcgis/core/Graphic"
import GraphicsLayer from "@arcgis/core/layers/GraphicsLayer"
import WMTSLayer from "@arcgis/core/layers/WMTSLayer"
import WebTileLayer from "@arcgis/core/layers/WebTileLayer"
import Compass from "@arcgis/core/widgets/Compass"
import Sketch from "@arcgis/core/widgets/Sketch"
import Extent from "@arcgis/core/geometry/Extent.js"

let initMap=function(mapData){
	
	let map = new Map({
	  basemap: mapData.basemap,
	})
	
	let mapView = new MapView({
	  background:'red',
	  extent:new Extent(mapData.extent),
	  map,
	  container: mapData.container,
	  center:mapData.center ,
	  zoom: mapData.zoom,
	})
	
	return {
		map,mapView
	}
	
}

export default initMap